﻿using FDStudio.Core.Entities;
using System;
using System.Data;
using System.Linq.Expressions;

namespace FDStudio.Core.Repositories
{
    /*
     CreatedOn: 2018-01-25
     CreatedBy: Jackie Lee(天宇遊龍)
     */
    /// <summary>
    /// 只写仓储
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IWriteOnlyRepository<T> : ITransactionRepository<T> where T : class, IEntity
    {
        bool Add(T model);

        bool Update(T model);

        bool Delete(long Id);

        bool Delete(T model);

        bool Delete(Expression<Func<T, bool>> condition);

        int ExecuteNonQuery(string sql, object parameter, CommandType commandType = CommandType.Text);
    }
}
